<template>
    <el-dialog
            :visible.sync="dialogVisible"
            width="40%"
            :fullscreen="fullscreen"
    >
        <div slot="title" class="save_title">
            {{title}}
            <i class="screen_ctr fa" @click="fullscreen=!fullscreen" :class="fullscreen?'fa-compress':'fa-expand'"></i>
        </div>
        <div class="save_wrapper">
            <el-form ref="save" size="mini" :inline="false" :model="editForm" :rules="rules">
                <el-form-item label="定时器名称" prop="quartzName" :label-width="formLabelWidth">
                    <el-input  v-model.trim="editForm.quartzName" placeholder="请输入定时器名称"></el-input>
                </el-form-item>
                <el-form-item label="cron表达式" prop="cron" :label-width="formLabelWidth">
                    <el-input  v-model.trim="editForm.cron" placeholder="cron表达式"></el-input>
                </el-form-item>
                <el-form-item label="描述" prop="quartzDesc" :label-width="formLabelWidth">
                    <el-input  v-model.trim="editForm.quartzDesc" placeholder="请输入描述"></el-input>
                </el-form-item>
            </el-form>
        </div>
        <span slot="footer" class="dialog-footer">
             <el-button @click="dialogVisible = false" size="mini">取 消</el-button>
            <el-button type="primary" size="mini" @click="save" :loading="isloading">确 定</el-button>
          </span>
    </el-dialog>
</template>

<script>
    import saveMixins from '../../../../common/mixins/saveMixins'
    import {selectById,saveQuartz} from "../../../../api/base/quartz";

    import validate from './validate'
    export default {
        name: "save" ,
        mixins:[saveMixins],
        data(){
            return{
                formLabelWidth:'120px',
                rules:validate,
                module:"定时器",
            }
        },
        created(){
        },
        methods:{
            commit(data){
                return saveQuartz(data);
            },
        }
    }
</script>

<style scoped lang="sass">
    @import "../../../../styles/save"
</style>
